import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: '/', redirect: '/login'
        },
        {
            path: '/login', name: 'Login', component: () => import('@/pages/CommonPages/Login.vue')
        },
        {
            path: '/registrarInterface', name: 'RegistrarInterface', component: () => import('@/pages/RegistrarInterface.vue'),
            children: [
                { path: '', redirect: '/registrarInterface/workbench' },
                { path: 'workbench', name: 'Workbench', component: () => import('@/pages/RegistrarPages/Workbench.vue') },
                { path: 'courseManagement', name: 'CourseManagement', component: () => import('@/pages/RegistrarPages/CourseManagement.vue') },
                { path: 'scheduledCourseManagement', name: 'ScheduledCourseManagement', component: () => import('@/pages/RegistrarPages/ScheduledCourseManagement.vue') },
                { path: 'classManagement', name: 'ClassManagement', component: () => import('@/pages/RegistrarPages/ClassManagement.vue') },
                { path: 'classroomManagement', name: 'ClassroomManagement', component: () => import('@/pages/RegistrarPages/ClassroomManagement.vue') },
                { path: 'talentPlanManagement', name: 'TalentPlanManagement', component: () => import('@/pages/RegistrarPages/TalentPlanManagement.vue') },
                { path: 'classroomApproval', name: 'ClassroomApproval', component: () => import('@/pages/RegistrarPages/ClassroomApproval.vue') },
                { path: 'examMethodApproval', name: 'ExamMethodApproval', component: () => import('@/pages/RegistrarPages/ExamMethodApproval.vue') },
                { path: 'exampaperApproval', name: 'ExampaperApproval', component: () => import('@/pages/RegistrarPages/ExampaperApproval.vue') },
                { path: 'finalExamManagement', name: 'FinalExamManagement', component: () => import('@/pages/RegistrarPages/FinalExamManagement.vue') },
                { path: 'textbookManagement', name: 'TextbookManagement', component: () => import('@/pages/RegistrarPages/TextbookManagement.vue') },
                { path: 'courseAdjustmentApproval', name: 'CourseAdjustmentApproval', component: () => import('@/pages/RegistrarPages/CourseAdjustmentApproval.vue') },
            ]
        },
        {
            path: '/studentInterface', name: 'StudentInterface', component: () => import('@/pages/StudentInterface.vue'),
            children: [
                { path: '', redirect: '/studentInterface/workbench' },
                { path: 'workbench', name: 'StudentWorkbench', component: () => import('@/pages/StudentPages/Workbench.vue') },
                { path: 'trainingProgram', name: 'TrainingProgram', component: () => import('@/pages/StudentPages/TrainingProgram.vue') },
                { path: 'scheduledCourseShow', name: 'ScheduledCourseShow', component: () => import('@/pages/StudentPages/ScheduledCourseShow.vue') },
                { path: 'finalExamShow', name: 'FinalExamShow', component: () => import('@/pages/StudentPages/FinalExamShow.vue') },
                { path: 'textbookShow', name: 'TextbookShow', component: () => import('@/pages/StudentPages/TextbookShow.vue') },
                { path: 'classroomApplication', name: 'StudentClassroomApplication', component: () => import('@/pages/StudentPages/ClassroomApplication.vue') },
            ]
        },
        {
            path: '/teacherInterface', name: 'TeacherInterface', component: () => import('@/pages/TeacherInterface.vue'),
            children: [
                { path: '', redirect: '/teacherInterface/workbench' },
                { path: 'workbench', name: 'TeacherWorkbench', component: () => import('@/pages/TeacherPages/Workbench.vue') },
                { path: 'trainingProgram', name: 'TeacherTrainingProgram', component: () => import('@/pages/TeacherPages/TrainingProgram.vue') },
                { path: 'scheduledCourseShow', name: 'TeacherScheduledCourseShow', component: () => import('@/pages/TeacherPages/ScheduledCourseShow.vue') },
                { path: 'classShow', name: 'TeacherClassShow', component: () => import('@/pages/TeacherPages/ClassShow.vue') },
                { path: 'examMethodApplication', name: 'ExamMethodApplication', component: () => import('@/pages/TeacherPages/ExamMethodApplication.vue') },
                { path: 'exampaperApplication', name: 'ExampaperApplication', component: () => import('@/pages/TeacherPages/ExampaperApplication.vue') },
                { path: 'finalExamShow', name: 'TeacherFinalExamShow', component: () => import('@/pages/TeacherPages/FinalExamShow.vue') },
                { path: 'textbookShow', name: 'TeacherTextbookShow', component: () => import('@/pages/TeacherPages/TextbookShow.vue') },
                { path: 'classroomApplication', name: 'TeacherClassroomApplication', component: () => import('@/pages/TeacherPages/ClassroomApplication.vue') },
                { path: 'courseAdjustApplication', name: 'CourseAdjustApplication', component: () => import('@/pages/TeacherPages/CourseAdjustApplication.vue') },
            ]
        }
    ]
})

router.beforeEach((to, from) => {

})

export default router
